﻿#region

using System.Collections.Generic;
using BusinessObjects;
using DataAccessLayer;

#endregion

namespace BusinessLogicLayer
{
    public static class CustomerBLL
    {
        public static bool IsEmailTaken(string email)
        {
            return CustomerDAL.IsEmailTaken(email);
        }

        public static void GetCustomerType(Customer customer)
        {
            CustomerDAL.GetCustomerType(customer);
        }

        public static void GetCustomerId(Customer customer)
        {
            CustomerDAL.GetCustomerId(customer);
        }

        public static void GetUsername(Customer customer)
        {
            CustomerDAL.GetUsername(customer);
        }

        /// <summary>
        ///     Get All customers
        /// </summary>
        /// <returns>All customers</returns>
        public static List<Customer> GetAllCustomers()
        {
            return CustomerDAL.GetAllCustomers();
        }

        /// <summary>
        ///     Get customer by telephone number
        /// </summary>
        /// <param name="telephone">Represent's the customer's telephone number</param>
        /// <returns>Customer</returns>
        public static Customer GetCustomerDetails(string telephone)
        {
            return CustomerDAL.GetCustomerDetails(telephone);
        }

        /// <summary>
        ///     Get customer name by customer id
        /// </summary>
        /// <param name="customerId">Represent's the customer id</param>
        /// <returns>Customer's name (Personal customer - First name / Business customer - Company name)</returns>
        public static string GetCustomerName(int customerId)
        {
            return CustomerDAL.GetCustomerName(customerId);
        }
    }
}